{
 "cells": [
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Triangle Function"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "x = np.linspace(-np.pi,np.pi)\n",
    "\n",
    "sin_x = np.sin(x)\n",
    "cos_x = np.cos(x)\n",
    "tan_x = np.tan(x)\n",
    "\n",
    "plt.plot(x, sin_x, label= \"SinX\")\n",
    "plt.plot(x, cos_x, label= \"CosX\")\n",
    "#plt.plot(x, tan_x, label= \"TanX\")\n",
    "plt.ylim(-2,2)\n",
    "plt.grid()\n",
    "plt.legend()\n",
    "\n",
    "\n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "n = 1000\n",
    "x = np.random.rand(n)\n",
    "y = np.random.rand(n)\n",
    "\n",
    "plt.scatter(x,y)\n",
    "plt.grid()\n",
    "plt.show()\n",
    "\n",
    "x = np.random.randn(n)\n",
    "y = np.random.randn(n)\n",
    "plt.scatter(x,y)\n",
    "\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.15"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
